Skip to content

refactor(cli): explicit connectorFromFile, drop ./connectors scan; flatten examples#1043

Merged
buremba merged 2 commits into
mainfrom
feat/flatten-examples
May 25, 2026
Merged

refactor(cli): explicit connectorFromFile, drop ./connectors scan; flatten examples#1043
buremba merged 2 commits into
mainfrom
feat/flatten-examples

Conversation

@buremba
Copy link
Copy Markdown
Member

@buremba buremba commented May 25, 2026

What

Connectors are now declared explicitly, replacing the ./connectors directory auto-discovery:

import { connectorFromFile, defineConfig } from "@lobu/cli/config";

export default defineConfig({
  connectors: [connectorFromFile("./funnel-form.connector.ts")],
  // connections still reference the connector by key (or its defineConnector class)
});

This completes the explicit-over-magic arc: reactions were already path-referenced, skills became explicit (#1039), and connectors were the last auto-scanned directory.

Why

./connectors was the same invisible discover-and-ship-everything scan we removed for skills. Explicit connectorFromFile means only referenced connectors compile + upload, the config shows what ships, and connectors can live anywhere — so the examples flatten to a single legible folder (the actual motivation):

lobu-crm/
  lobu.config.ts
  funnel-form.connector.ts        # was connectors/funnel-form.connector.ts
  inbound-triage.reaction.ts      # was models/reactions/inbound-triage.reaction.ts
  funnel-digest.reaction.ts
  agents/crm/...

The vestigial models/ (a leftover of the old file-first layout) and connectors/ dirs are gone across all examples.

How it stays low-risk

The connection↔connector key wiring is decoupled from source-shipping: connectorKey() resolves from the string/class in the pure mapper, exactly as before. This change only swaps how the source list is produced — the loader builds the same DesiredConnectorDefinition[] ({ key: null, sourcePath, sourceCode }) from the explicit list instead of a readdir. The compile / install / catalog / key-resolution flow in apply-cmd is untouched. init-from-org is unaffected (it never emitted local connector source — it references by key string).

Scope

  • Core: connectorFromFile + Project.connectors (define.ts); scan → resolveConnectorSources with path guards mirroring resolveReactionScript (desired-state.ts).
  • Examples: 16 file renames (connectors + reactions → root), 11 config edits, models/ + connectors/ dirs removed.
  • Docs/tooling: getting-started (index, connector-sdk, reaction-sdk), reference (cli, lobu-config, reaction-sdk), the landing snippet generator + regenerated JSON, LandingPage.tsx prompt copy, lobu-crm README, and the lobu starter skill. Also corrected a stale "reactions auto-pair by filename" claim (they wire via the explicit reaction: path).

Verification

  • bun run typecheck (strict) clean; 151 CLI unit tests pass (connector tests rewritten: explicit ship, --only skip, sort, missing-file + path-escape guards).
  • cd packages/landing && bun run build clean (86 pages; prebuild regenerates snippets from the new paths).
  • End-to-end: loadDesiredStateFromConfig on all 12 examples loads — 9 connectors resolved from connectorFromFile, reactions from the flattened paths.

Note: the connector compile+install+run path itself is unchanged, so this is covered by typecheck + unit + the load-level E2E; no behavioral change to how connectors execute.

Summary by CodeRabbit

  • New Features

    • Add explicit local connector registration (use connectorFromFile() in config) and support for loading connector sources from config rather than auto-discovery.
    • Init scaffolding now includes connector and reaction file patterns.
  • Documentation

    • Updated Getting Started, SDK, and reference docs to show explicit connector/reaction references and revised project-structure guidance.
  • Refactor

    • Example projects reorganized so connectors and watcher reactions live at the example root and are referenced directly from config.

Review Change Stack

…atten examples

Connectors are declared explicitly via defineConfig({ connectors:
[connectorFromFile("./x.connector.ts")] }), replacing the ./connectors directory
auto-discovery. Only listed connectors compile + ship; the compile / install /
key-resolution flow is unchanged (the loader produces the same
DesiredConnectorDefinition shape it used to). Connections still reference
connectors by key or defineConnector class.

Flatten the examples for legibility: connector and reaction files move to the
project root next to lobu.config.ts; the vestigial models/reactions/ and
connectors/ directories are gone (reactions were already path-referenced, so
this just colocates them). Updates the docs, the landing snippet generator, and
the lobu starter skill to match.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ab007213-e5e3-4fe5-811a-a1e9e5320ac8

📥 Commits

Reviewing files that changed from the base of the PR and between f9fdd36 and 83093af.

📒 Files selected for processing (15)
  • examples/agent-community/tsconfig.json
  • examples/atlas/tsconfig.json
  • examples/delivery/tsconfig.json
  • examples/ecommerce/tsconfig.json
  • examples/finance/tsconfig.json
  • examples/leadership/tsconfig.json
  • examples/legal/tsconfig.json
  • examples/lobu-crm/tsconfig.json
  • examples/market/tsconfig.json
  • examples/office-bot/tsconfig.json
  • examples/personal-finance/tsconfig.json
  • examples/sales/tsconfig.json
  • packages/cli/src/commands/_lib/apply/desired-state.ts
  • packages/cli/src/commands/init.ts
  • packages/landing/src/components/LandingPage.tsx
✅ Files skipped from review due to trivial changes (9)
  • examples/delivery/tsconfig.json
  • examples/office-bot/tsconfig.json
  • examples/finance/tsconfig.json
  • examples/ecommerce/tsconfig.json
  • examples/agent-community/tsconfig.json
  • examples/sales/tsconfig.json
  • examples/legal/tsconfig.json
  • examples/lobu-crm/tsconfig.json
  • examples/market/tsconfig.json

📝 Walkthrough

Walkthrough

This PR migrates connector and watcher reaction file handling from implicit directory auto-discovery (./connectors/ and ./models/reactions/) to explicit declarative configuration via a new connectorFromFile() API in lobu.config.ts. The change updates the CLI loader, test suite, all example configurations, and comprehensive documentation.

Changes

Connector file-path refactoring: from auto-discovery to explicit connectorFromFile() configuration

Layer / File(s) Summary
Connector source API contract
packages/cli/src/config/define.ts
New ConnectorSource interface with branded kind: "connectorSource" and path field; connectorFromFile(path) helper function and optional connectors?: ConnectorSource[] field added to Project config export type.
Connector source resolution and loading
packages/cli/src/commands/_lib/apply/desired-state.ts
New resolveConnectorSources() function replaces directory auto-discovery; validates paths (no .., relative POSIX, .ts suffix, within config dir), reads source code synchronously, and emits DesiredConnectorDefinition entries with sourceFile/sourcePath/sourceCode.
Connector loading test coverage
packages/cli/src/commands/_lib/apply/__tests__/load-config.test.ts
Tests verify connectorFromFile("./weather.connector.ts") fixtures load with correct definition fields, connections resolve by key, definitions sort by sourceFile, missing files fail clearly, and paths with .. escapes are rejected. Removed legacy test for connectors/*.connector.ts auto-discovery.
Example configurations migrated to connectorFromFile
examples/agent-community/lobu.config.ts, examples/atlas/lobu.config.ts, examples/delivery/lobu.config.ts, examples/ecommerce/lobu.config.ts, examples/finance/lobu.config.ts, examples/leadership/lobu.config.ts, examples/legal/lobu.config.ts, examples/lobu-crm/lobu.config.ts, examples/market/lobu.config.ts, examples/sales/lobu.config.ts
Each example config imports connectorFromFile and lists connectors explicitly in the defineConfig() export; watcher reaction paths updated from ./models/reactions/*.reaction.ts to ./*.reaction.ts at the example root.
Example project structure documentation
examples/lobu-crm/README.md
Project tree and "Key files to read" sections updated to show connector and reaction files at the example root instead of under connectors/ and models/reactions/ subdirectories.
Landing page snippet generation
packages/landing/scripts/gen-landing-snippets.ts
gen-landing-snippets.ts updates pinned connector/reaction example paths; findConnectorFile() now searches examples/<slug>/ directly for *.connector.ts and returns bare filename without connectors/ prefix.
Landing page setup prompt
packages/landing/src/components/LandingPage.tsx
SETUP_PROMPT step 3 text updated to describe scaffolded outputs as coming from lobu.config.ts plus referenced connector, reaction, and skill files.
Connector SDK documentation
packages/landing/src/content/docs/getting-started/connector-sdk.md
Connector authoring guide updated to show saving *.connector.ts anywhere and registering via defineConfig({ connectors: [...] }); removed connectors/ directory auto-discovery description and updated example GitHub URLs.
Project structure and getting started docs
packages/landing/src/content/docs/getting-started/index.mdx
Getting Started docs updated to show skills/ under agents/<id>/; added clarification that connectors, reactions, and skills are explicitly referenced from lobu.config.ts with no auto-discovery.
CLI and config reference documentation
packages/landing/src/content/docs/reference/cli.md, packages/landing/src/content/docs/reference/lobu-config.md, packages/landing/src/content/docs/reference/reaction-sdk.md
CLI init docs and lobu.config reference updated to document new connectors field and connectorFromFile usage; reaction lifecycle docs clarified to reference watcher's configured reaction path.
Reaction documentation examples
packages/landing/src/content/docs/getting-started/reaction-sdk.md
Example link updated to point to examples/sales/account-health-monitor.reaction.ts at root instead of models/reactions/ subdirectory.
Skill scaffolding documentation
skills/lobu/SKILL.md
Skill template docs updated to show connectors and reactions placed at root with explicit connectorFromFile() and reaction path references instead of nested subdirectories.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • lobu-ai/lobu#988: The landing-side snippet/path updates overlap with this PR's landing refactor and snippet generation changes.
  • lobu-ai/lobu#973: Related work on connector install/compile pipeline that consumes connector sourcePath/sourceCode fields.

Suggested labels

skip-size-check

Poem

🐇 I hopped through configs, tiny and bright,
No more hidden folders out of sight.
Connectors now follow the path you declare,
Reactions at root, tidy and fair.
A little rabbit cheers the clearer affair.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main changes: explicit connectorFromFile API, removal of ./connectors directory scanning, and flattening of example project structures.
Description check ✅ Passed The description includes all required sections: a clear 'What' explaining the change, detailed 'Why' rationale with examples, a 'How' section addressing risk mitigation, comprehensive 'Scope' breakdown, and thorough 'Verification' with test results.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/flatten-examples

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 25, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 75.47170% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...kages/cli/src/commands/_lib/apply/desired-state.ts 72.34% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

@buremba
Copy link
Copy Markdown
Member Author

buremba commented May 25, 2026

bug_free 76, simplicity 82, slop 12, bugs 1, 0 blockers

typecheck/unit passed; [env] integration refused DATABASE_URL database "postgres" as unsafe, unrelated to diff. Explored by loading desired state for examples/ecommerce, lobu-crm, and agent-community via bun import; connectorFromFile and reaction paths resolved.

Suggested fixes

File Line Change
packages/cli/src/commands/init.ts 215 Replace the generated tsconfig includes for connectors/**/*.ts and reactions/**/*.ts with patterns that cover explicit root files, e.g. **/*.connector.ts and **/*.reaction.ts.
examples/lobu-crm/tsconfig.json 13 Update this and the other flattened example tsconfigs to include the new root *.connector.ts / *.reaction.ts files so example typechecks cover them.
packages/cli/src/commands/_lib/apply/desired-state.ts 217 Update the connector comments to remove stale ./connectors auto-discovery language and delete the duplicate obsolete comment block at lines 709-734.
packages/landing/src/components/LandingPage.tsx 1001 Replace connectors/ with wording that matches explicit connector files, e.g. *.connector.ts.
Full verdict JSON
{
  "bug_free_confidence": 76,
  "bugs": 1,
  "slop": 12,
  "simplicity": 82,
  "blockers": [],
  "change_type": "refactor",
  "behavior_change_risk": "medium",
  "tests_adequate": false,
  "suggested_fixes": [
    {
      "file": "packages/cli/src/commands/init.ts",
      "line": 215,
      "change": "Replace the generated tsconfig includes for `connectors/**/*.ts` and `reactions/**/*.ts` with patterns that cover explicit root files, e.g. `**/*.connector.ts` and `**/*.reaction.ts`."
    },
    {
      "file": "examples/lobu-crm/tsconfig.json",
      "line": 13,
      "change": "Update this and the other flattened example tsconfigs to include the new root `*.connector.ts` / `*.reaction.ts` files so example typechecks cover them."
    },
    {
      "file": "packages/cli/src/commands/_lib/apply/desired-state.ts",
      "line": 217,
      "change": "Update the connector comments to remove stale `./connectors` auto-discovery language and delete the duplicate obsolete comment block at lines 709-734."
    },
    {
      "file": "packages/landing/src/components/LandingPage.tsx",
      "line": 1001,
      "change": "Replace `connectors/` with wording that matches explicit connector files, e.g. `*.connector.ts`."
    }
  ],
  "notes": "typecheck/unit passed; [env] integration refused DATABASE_URL database \"postgres\" as unsafe, unrelated to diff. Explored by loading desired state for examples/ecommerce, lobu-crm, and agent-community via bun import; connectorFromFile and reaction paths resolved.",
  "categories": {
    "src": 126,
    "tests": 94,
    "docs": 72,
    "config": 32,
    "deps": 0,
    "migrations": 0,
    "ci": 0,
    "generated": 68
  }
}

Local review gate — branch protection can require the pi-review commit status. See docs/REVIEW_SCHEMA.md.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/landing/src/content/docs/getting-started/reaction-sdk.md (1)

122-130: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the local file-layout example to root-level reaction paths.

This page still documents reactions/critical-detection.reaction.ts and reaction: "./reactions/...", which conflicts with the new explicit root-level layout shown elsewhere in this PR.

Also applies to: 132-143

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/landing/src/content/docs/getting-started/reaction-sdk.md` around
lines 122 - 130, Update the file-layout example and any inline examples of the
reaction path so they show root-level reactions instead of an agent-local
reactions folder: move the "reactions/critical-detection.reaction.ts" entry out
of the my-agent/ tree to a top-level reactions/critical-detection.reaction.ts in
the example and change the config/property example that shows reaction:
"./reactions/..." to reference the root-level path used elsewhere in the PR
(e.g., "./reactions/critical-detection.reaction.ts"); apply the same replacement
for the other occurrences around lines 132–143.
🧹 Nitpick comments (1)
packages/cli/src/commands/_lib/apply/desired-state.ts (1)

709-734: ⚡ Quick win

Remove orphaned JSDoc comment describing obsolete auto-discovery behavior.

This comment block documents the removed discoverLocalConnectorDefinitions function and its ./connectors/*.connector.ts auto-discovery behavior. With the function replaced by resolveConnectorSources, this JSDoc is now orphaned (two consecutive JSDoc blocks before a single function). The new comment at lines 735-742 adequately documents the current explicit-list behavior.

♻️ Proposed fix
-/**
- * Discover local connector definitions for the TypeScript config path.
- *
- * A `lobu.config.ts` references connectors by key (or via the class returned by
- * `defineConnector`); the source the server compiles lives in
- * `./connectors/*.connector.ts`. We ship each file's source with `key: null` —
- * the server compiles it and resolves the real key, the same contract the YAML
- * loader used for auto-discovered `.connector.ts` files. `apply-cmd` then
- * compiles each `sourcePath` on the CLI (where the project's node_modules is
- * available) and uploads it via `install_connector`.
- *
- * We intentionally do NOT compile/instantiate the connector here to resolve its
- * key eagerly: that would force a full esbuild + module load (and installed
- * project deps, and any module-load side effects) on every load — including
- * `--dry-run` — for no benefit, since the server is the source of truth for the
- * compiled key. The cost is deferred to post-confirmation install in apply-cmd.
- *
- * Caveat (shared with YAML auto-discovery, see `locallyDeclaredConnectorKeys`):
- * because the shipped key is `null`, a connection's config is validated against
- * the *fresh* catalog only after install, and a connection that references a
- * connector by a bare *string* key relies on that string matching the file's
- * compiled `definition.key`. Reference the connector by its `defineConnector`
- * class instead (`connector: myConnector`) to make that match exact — the
- * mapper resolves the key from `definition.key`, so a typo can't silently bind
- * the connection to a different (bundled/remote) connector.
- */
 /**
  * Resolve the project's explicit `connectors: [connectorFromFile(...)]` list
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/cli/src/commands/_lib/apply/desired-state.ts` around lines 709 -
734, The large JSDoc block describing discoverLocalConnectorDefinitions and
auto-discovery is now stale/orphaned and precedes the new
resolveConnectorSources implementation; remove that obsolete JSDoc so only the
current comment describing explicit-list behavior (the new JSDoc that documents
resolveConnectorSources) remains directly above the function. Locate the old
comment block that references discoverLocalConnectorDefinitions and
./connectors/*.connector.ts and delete it, leaving the new JSDoc (lines
mentioning explicit-list behavior and resolveConnectorSources) intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/landing/src/content/docs/getting-started/reaction-sdk.md`:
- Line 162: Summary: Replace the em dash used in the landing doc line with a
colon or hyphen. Edit the markdown line containing the link text
"examples/sales/account-health-monitor.reaction.ts" (the sentence that mentions
persisting each one as a typed `health_change` event) and swap the em dash
character (—) for a colon (:) or hyphen (-) so the user-facing copy follows the
guideline against em dashes in landing text.

---

Outside diff comments:
In `@packages/landing/src/content/docs/getting-started/reaction-sdk.md`:
- Around line 122-130: Update the file-layout example and any inline examples of
the reaction path so they show root-level reactions instead of an agent-local
reactions folder: move the "reactions/critical-detection.reaction.ts" entry out
of the my-agent/ tree to a top-level reactions/critical-detection.reaction.ts in
the example and change the config/property example that shows reaction:
"./reactions/..." to reference the root-level path used elsewhere in the PR
(e.g., "./reactions/critical-detection.reaction.ts"); apply the same replacement
for the other occurrences around lines 132–143.

---

Nitpick comments:
In `@packages/cli/src/commands/_lib/apply/desired-state.ts`:
- Around line 709-734: The large JSDoc block describing
discoverLocalConnectorDefinitions and auto-discovery is now stale/orphaned and
precedes the new resolveConnectorSources implementation; remove that obsolete
JSDoc so only the current comment describing explicit-list behavior (the new
JSDoc that documents resolveConnectorSources) remains directly above the
function. Locate the old comment block that references
discoverLocalConnectorDefinitions and ./connectors/*.connector.ts and delete it,
leaving the new JSDoc (lines mentioning explicit-list behavior and
resolveConnectorSources) intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 27f5046a-053a-450f-b0a6-b31ac94f87dc

📥 Commits

Reviewing files that changed from the base of the PR and between 5e488ce and f9fdd36.

⛔ Files ignored due to path filters (1)
  • packages/landing/src/generated/landing-snippets.json is excluded by !**/generated/**
📒 Files selected for processing (39)
  • examples/agent-community/discourse-posts.connector.ts
  • examples/agent-community/lobu.config.ts
  • examples/agent-community/opportunity-matcher.reaction.ts
  • examples/atlas/catalog-staleness-checker.reaction.ts
  • examples/atlas/lobu.config.ts
  • examples/delivery/lobu.config.ts
  • examples/delivery/shopify-orders.connector.ts
  • examples/ecommerce/lobu.config.ts
  • examples/ecommerce/stripe-charges.connector.ts
  • examples/finance/lobu.config.ts
  • examples/finance/quickbooks-transactions.connector.ts
  • examples/finance/reconciliation-monitor.reaction.ts
  • examples/leadership/linear-cycles.connector.ts
  • examples/leadership/lobu.config.ts
  • examples/legal/docusign-envelopes.connector.ts
  • examples/legal/lobu.config.ts
  • examples/lobu-crm/README.md
  • examples/lobu-crm/funnel-digest.reaction.ts
  • examples/lobu-crm/funnel-form.connector.ts
  • examples/lobu-crm/inbound-triage.reaction.ts
  • examples/lobu-crm/lobu.config.ts
  • examples/market/exa-news-feed.connector.ts
  • examples/market/founder-activity-tracker.reaction.ts
  • examples/market/lobu.config.ts
  • examples/sales/account-health-monitor.reaction.ts
  • examples/sales/lobu.config.ts
  • examples/sales/salesforce-pipeline.connector.ts
  • packages/cli/src/commands/_lib/apply/__tests__/load-config.test.ts
  • packages/cli/src/commands/_lib/apply/desired-state.ts
  • packages/cli/src/config/define.ts
  • packages/landing/scripts/gen-landing-snippets.ts
  • packages/landing/src/components/LandingPage.tsx
  • packages/landing/src/content/docs/getting-started/connector-sdk.md
  • packages/landing/src/content/docs/getting-started/index.mdx
  • packages/landing/src/content/docs/getting-started/reaction-sdk.md
  • packages/landing/src/content/docs/reference/cli.md
  • packages/landing/src/content/docs/reference/lobu-config.md
  • packages/landing/src/content/docs/reference/reaction-sdk.md
  • skills/lobu/SKILL.md

## See it in production

- [`examples/sales/models/reactions/account-health-monitor.reaction.ts`](https://github.com/lobu-ai/lobu/blob/main/examples/sales/models/reactions/account-health-monitor.reaction.ts) — filters worsening risk transitions out of a watcher's account-changes extraction and persists each one as a typed `health_change` event.
- [`examples/sales/account-health-monitor.reaction.ts`](https://github.com/lobu-ai/lobu/blob/main/examples/sales/account-health-monitor.reaction.ts) — filters worsening risk transitions out of a watcher's account-changes extraction and persists each one as a typed `health_change` event.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Replace the em dash in landing doc copy.

This line uses an em dash in user-facing text; please switch to a colon or hyphen.

As per coding guidelines, "packages/landing/**/*.{ts,tsx,md}: Do not use em dashes in user-facing text in landing copy".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/landing/src/content/docs/getting-started/reaction-sdk.md` at line
162, Summary: Replace the em dash used in the landing doc line with a colon or
hyphen. Edit the markdown line containing the link text
"examples/sales/account-health-monitor.reaction.ts" (the sentence that mentions
persisting each one as a typed `health_change` event) and swap the em dash
character (—) for a colon (:) or hyphen (-) so the user-facing copy follows the
guideline against em dashes in landing text.

- lobu init + all example tsconfigs: include `**/*.connector.ts` / `**/*.reaction.ts`
  so the flattened root-level files are covered (was connectors/** + reactions/**).
- desired-state.ts: drop the orphaned discoverLocalConnectorDefinitions doc block
  and the stale "./connectors" auto-discovery wording.
- LandingPage.tsx: connectors/ → *.connector.ts in the self-host blurb.
@buremba buremba merged commit 36a91c8 into main May 25, 2026
16 of 20 checks passed
@buremba buremba deleted the feat/flatten-examples branch May 25, 2026 14:43
buremba added a commit that referenced this pull request May 25, 2026
…./connectors scan) (#1048)

PR #1043 removed the ./connectors auto-discovery in favor of explicit
connectorFromFile(), and swept every examples/*/lobu.config.ts over — but
the sdk-e2e gate scaffolds its own hermetic fixture inline in a shell-script
heredoc (not in examples/), so the migration missed it. The fixture's local
pulse.connector.ts was no longer discovered, so connection "pulse" referenced
an uninstalled connector "sdke2e-pulse" → apply halted → main went red.

Declare the connector explicitly to match the new API.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants